package com.lyy.polymorphic.detail;


/**
 * @Author:  GZQ
 * @date:  2024/11/17 23:24
 * @description: 多态的注意事项和细节讨论
 */

public class Animal {
    String name = "动物";
    int age = 10;
    public void sleep() {
        System.out.println("睡");
    }

    public void run() {
        System.out.println("跑");
    }

    public void eat() {
        System.out.println("吃");
    }

    public void show() {
        System.out.println("hello, 你好");
    }
}
